package com.care.doctor.server.controller;

import com.care.common.core.domain.Result;
import com.care.doctor.common.domain.DTODepartment;
import com.care.doctor.common.req.ListReq;
import com.care.doctor.server.service.DepartmentService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: 靳家振
 * @Date: 2024/3/22 19:43
 * @Description:
 **/

@RestController
@RequestMapping("/department")
public class DepartmentController {
    @Autowired
    private DepartmentService departmentService;
    @PostMapping("/findDepartment")
    public Result<PageInfo<DTODepartment>> findDepartment(@RequestBody ListReq req)
    {
        return departmentService.findDepartment(req);
    }
    @GetMapping("/listAll")
    public Result listAll(){
        return departmentService.listAll();
    }


}
